package com.flyme.module.base.provider.service.impl;

import com.flyme.common.core.model.query.CriteriaQuery;
import com.flyme.core.base.supper.entity.EntityMap;
import com.flyme.core.base.supper.service.impl.BaseServiceImpl;
import com.flyme.module.base.client.entity.SysCertifistudyrecord;
import com.flyme.module.base.provider.mapper.SysCertifistudyrecordMapper;
import com.flyme.module.base.provider.service.SysCertifistudyrecordService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysCertifistudyrecordServiceImpl extends BaseServiceImpl<SysCertifistudyrecordMapper, SysCertifistudyrecord> implements SysCertifistudyrecordService {
    @Override
    public List<EntityMap> getuserStudyRecord(Long courserId, Long catalogId, Long sysuserCertifiId, String startTime, String endTime) {
        CriteriaQuery queryWrapper = new CriteriaQuery<EntityMap>();
        queryWrapper.addSql("*");
        queryWrapper.eq("courserId",courserId);
        queryWrapper.eq("catalogId",catalogId);
        queryWrapper.eq("sysuserCertifiId",sysuserCertifiId);
        queryWrapper.between("createTime",startTime,endTime);
        return listEntityMaps(queryWrapper);
    }
}
